﻿using Newtonsoft.Json;
using Pay.Core;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO
{
    /// <summary>
    /// 商家介绍表 mc_MerchIntroduce
    /// </summary>
    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class merch_introduce_dto
    {
        /// <summary>
        /// 商家介绍Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 商家名称
        /// </summary>
        public string merch_name { get; set; }

        /// <summary>
        /// 商家LogoUrl
        /// </summary>
        public string logo_url { get; set; }

        /// <summary>
        /// 详细介绍
        /// </summary>
        public string detail { get; set; }

        /// <summary>
        /// 可获取的马力值
        /// </summary>
        public int soup_value { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }

        /// <summary>
        /// 状态（1：正常，2：停用）
        /// </summary>
        public EMerchIntroduceStatus status { get; set; }

        /// <summary>
        /// 状态枚举描述
        /// </summary>
        public string status_title { get { return this.status.ToDescription(); } }

        /// <summary>
        /// 是否推荐
        /// </summary>
        public bool is_recommend { get; set; }

        /// <summary>
        /// 点击数
        /// </summary>
        public int click_num { get; set; }


        /// <summary>
        /// 领取数
        /// </summary>
        public int get_num { get; set; }

        /// <summary>
        /// 是否允许领取马力值
        /// </summary>
        public bool isAllowGetSoupValue { get; set; }
    }
    [Serializable]
    public class merch_dto {
        /// <summary>
        /// 商家介绍Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 商家名称
        /// </summary>
        public string merch_name { get; set; }

        /// <summary>
        /// 商家LogoUrl
        /// </summary>
        public string logo_url { get; set; }

    }
    [Serializable]
    public class merch_detail_dto: merch_dto {
        /// <summary>
        /// 详细介绍
        /// </summary>
        public string detail { get; set; }
        /// <summary>
        /// 是否允许领取马力值
        /// </summary>
        public bool isAllowGetSoupValue { get; set; }
        /// <summary>
        /// 可获取的马力值
        /// </summary>
        public int soup_value { get; set; }
    }
    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class merch_introduce_dto_ex : merch_introduce_dto
    {
        /// <summary>
        /// 状态枚举下拉数据
        /// </summary>
        public List<DropdownItem> e_status_list
        {
            get { return typeof(EMerchIntroduceStatus).GetDropdownItemList(); }
        }
        /// <summary>
        /// 状态枚举值
        /// </summary>
        public string status_value { get; set; }

        /// <summary>
        /// 是否推荐对应值
        /// </summary>
        public string is_recommend_value { get; set; }
    }
    }
